package com.qianfeng.qlm.handforireader.util;

/**
 * Created by IntelliJ IDEA
 * User:tadhg
 * Date:2015/3/25
 * Email:tadhg299@163.com
 */
public class UrlMaker {
    public static String GetComicInfor(String comicId){

        String str1 = "2.4";
        long l = System.currentTimeMillis();
        String str2 = "0";
        String str3 = KEncryption.md5(str1 + l + comicId + str2 + Constant.SIGNKEY);
        String str4 = Constant.URL_SUFFIX+ "/comic.php?m=AndroidV2x&a=comicinfo" + "&version=" + str1 + "&apitime=" + l + "&comic_id=" + comicId + "&uid=" + str2 + "&sign=" + str3;
        return str4;
    }

    public static String GetComicContent(String comicId , String orderIdx){
        String str1 = "2.4";
        long l = System.currentTimeMillis();
        String str3 = "0";
        String str4 = KEncryption.md5(str1 + l + comicId + orderIdx + str3 + Constant.SIGNKEY);
        String str5 = Constant.URL_SUFFIX + "/comic.php?m=AndroidV2x&a=comiccontent" + "&version=" + str1 + "&apitime=" + l + "&comicid=" + comicId + "&orderidx=" + orderIdx  + "&uid=" + str3 + "&sign=" + str4;
        return str5;
    }

    public static String GetComicTypeList(String comictagId,String pageNum){
        String str1 = "2.4";
        long l = System.currentTimeMillis();
        String str2 = "0";
        String str3 = KEncryption.md5(str1 + l + comictagId + str2 + Constant.SIGNKEY);
        String str4 = Constant.URL_SUFFIX + "/comic.php?m=AndroidV2x&a=comiclistbytagid" + "&version=" + str1 + "&apitime=" + l + "&comictagid=" + comictagId + "&pagenum=" + pageNum + "&uid=" + str2 + "&sign=" + str3;
        return str4;
    }

    public static String GetHotComicList(String pageNum){
        String str1 = "2.4";
        long l = System.currentTimeMillis();
        String str2 = KEncryption.md5(str1 + l + pageNum + Constant.SIGNKEY);
        String str3 = Constant.URL_SUFFIX + "/comic.php?m=AndroidV2x&a=hotcomiclist" + "&version=" + str1 + "&apitime=" + l + "&pagenum=" + pageNum + "&sign=" + str2;
        return str3;
    }
}
